<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Cookie</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Cookie</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Cookie class</p>
	<ul class="tags">
				<li><span class="field">author:</span> Jeroen Simons &lt;<a href="mailto:jeroen@melange.nl">jeroen@melange.nl</a>&gt;</li>
				<li><span class="field">copyright:</span> Copyright (c) 2007 Jeroen Simons. All rights reserved</li>
				<li><span class="field">link:</span> <a href="http://www.melange.nl/">http://www.melange.nl/</a></li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_http---Cookie.php.html">/http/Cookie.php</a> (line <span class="field">39</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																				
												<div class="method-definition">
											<span class="method-result">Cookie</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$domain</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$secure</span> = <span class="var-default">false</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$httponly</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getDomain" title="details" class="method-name">getDomain</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getExpire" title="details" class="method-name">getExpire</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getHttponly" title="details" class="method-name">getHttponly</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getName" title="details" class="method-name">getName</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getPath" title="details" class="method-name">getPath</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getSecure" title="details" class="method-name">getSecure</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#getValue" title="details" class="method-name">getValue</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setDomain" title="details" class="method-name">setDomain</a>
											(<span class="var-type">domain</span>&nbsp;<span class="var-name">$domain</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setExpire" title="details" class="method-name">setExpire</a>
											(<span class="var-type">expire</span>&nbsp;<span class="var-name">$expire</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setHttponly" title="details" class="method-name">setHttponly</a>
											(<span class="var-type">httponly</span>&nbsp;<span class="var-name">$httponly</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setName" title="details" class="method-name">setName</a>
											(<span class="var-type">name</span>&nbsp;<span class="var-name">$name</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setPath" title="details" class="method-name">setPath</a>
											(<span class="var-type">path</span>&nbsp;<span class="var-name">$path</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setSecure" title="details" class="method-name">setSecure</a>
											(<span class="var-type">secure</span>&nbsp;<span class="var-name">$secure</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setValue" title="details" class="method-name">setValue</a>
											(<span class="var-type">value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">String</span>
										<a href="#__toString" title="details" class="method-name">__toString</a>
										()
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">68</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Construct new cookie.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">Cookie</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span> = <span class="var-default">null</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$expire</span> = <span class="var-default">0</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$path</span> = <span class="var-default">null</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$domain</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$secure</span> = <span class="var-default">false</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$httponly</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$expire</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$path</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$domain</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$secure</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$httponly</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetDomain" id="getDomain"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getDomain</span> (line <span class="line-number">202</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the domain that the cookie is available.</p>
<p class="description"><p>To make the cookie available on all subdomains of example.com  then you'd set it to '.example.com'. The . is not required but  makes it compatible with more browsers. Setting it to www.example.com  will make the cookie only available in the www  subdomain.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getDomain
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetExpire" id="getExpire"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getExpire</span> (line <span class="line-number">138</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the time the cookie expires. This is a Unix timestamp so</p>
<p class="description"><p>is in number of seconds since the epoch. In other words,  you'll most likely set this with the time() function plus  the number of seconds before you want it to expire. Or you  might use mktime().</p><p>time()+60*60*24*30 will set the cookie to expire in 30 days.  If set to 0, or omitted, the cookie will expire at the end of  the session (when the browser closes).</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getExpire
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetHttponly" id="getHttponly"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getHttponly</span> (line <span class="line-number">255</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">When TRUE the cookie will be made accessible only through the HTTP protocol.</p>
<p class="description"><p>This means that the cookie won't be accessible by scripting languages, such  as JavaScript. This setting can effectly help to reduce identity theft  through XSS attacks (although it is not supported by all browsers).  Added in PHP 5.2.0.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getHttponly
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetName" id="getName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getName</span> (line <span class="line-number">88</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the name of the cookie.</p>
<p class="description"><p>'cookiename' is called as $_COOKIE['cookiename']</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getName
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetPath" id="getPath"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getPath</span> (line <span class="line-number">171</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the path on the server in which the cookie will be  available on.</p>
<p class="description"><p>If set to '/', the cookie will be available within the entire  domain. If set to '/foo/', the cookie will only be available  within the /foo/ directory and all sub-directories such as  /foo/bar/ of domain. The default value is the current directory  that the cookie is being set in.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getPath
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetSecure" id="getSecure"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getSecure</span> (line <span class="line-number">229</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Indicates that the cookie should only be transmitted over a secure</p>
<p class="description"><p>HTTPS connection from the client. When set to TRUE, the cookie will  only be set if a secure connection exists. The default is FALSE. On  the server-side, it's on the programmer to send this kind of cookie  only on secure connection (e.g. with respect to $_SERVER[&quot;HTTPS&quot;]).</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getSecure
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetValue" id="getValue"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getValue</span> (line <span class="line-number">110</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Return the value of the cookie.</p>
<p class="description"><p>This value is stored on the clients computer;  do not store sensitive information.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			getValue
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetDomain" id="setDomain"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setDomain</span> (line <span class="line-number">217</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the domain that the cookie is available.</p>
<p class="description"><p>To make the cookie available on all subdomains of example.com  then you'd set it to '.example.com'. The . is not required but  makes it compatible with more browsers. Setting it to www.example.com  will make the cookie only available in the www  subdomain.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setDomain
		</span>
					(<span class="var-type">domain</span>&nbsp;<span class="var-name">$domain</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">domain</span>
				<span class="var-name">$domain</span><span class="var-description">: The domain that the cookie is available.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetExpire" id="setExpire"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setExpire</span> (line <span class="line-number">156</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the time the cookie expires. This is a Unix timestamp so</p>
<p class="description"><p>is in number of seconds since the epoch. In other words,  you'll most likely set this with the time() function plus  the number of seconds before you want it to expire. Or you  might use mktime().</p><p>time()+60*60*24*30 will set the cookie to expire in 30 days.  If set to 0, or omitted, the cookie will expire at the end of  the session (when the browser closes).</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setExpire
		</span>
					(<span class="var-type">expire</span>&nbsp;<span class="var-name">$expire</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">expire</span>
				<span class="var-name">$expire</span><span class="var-description">: The time the cookie expires</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetHttponly" id="setHttponly"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setHttponly</span> (line <span class="line-number">269</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">When TRUE the cookie will be made accessible only through the HTTP protocol.</p>
<p class="description"><p>This means that the cookie won't be accessible by scripting languages, such  as JavaScript. This setting can effectly help to reduce identity theft  through XSS attacks (although it is not supported by all browsers).  Added in PHP 5.2.0.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setHttponly
		</span>
					(<span class="var-type">httponly</span>&nbsp;<span class="var-name">$httponly</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">httponly</span>
				<span class="var-name">$httponly</span><span class="var-description">: Boolean make accessible only through the HTTP protocol</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetName" id="setName"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setName</span> (line <span class="line-number">99</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the name of the cookie.</p>
<p class="description"><p>'cookiename' is called as $_COOKIE['cookiename']</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setName
		</span>
					(<span class="var-type">name</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">name</span>
				<span class="var-name">$name</span><span class="var-description">: The name of the cookie</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetPath" id="setPath"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setPath</span> (line <span class="line-number">189</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the path on the server in which the cookie will be  available on.</p>
<p class="description"><p>If set to '/', the cookie will be available within the entire  domain. If set to '/foo/', the cookie will only be available  within the /foo/ directory and all sub-directories such as  /foo/bar/ of domain. The default value is the current directory  that the cookie is being set in.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setPath
		</span>
					(<span class="var-type">path</span>&nbsp;<span class="var-name">$path</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">path</span>
				<span class="var-name">$path</span><span class="var-description">: the path on the server in which the cookie will be  available on</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetSecure" id="setSecure"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setSecure</span> (line <span class="line-number">243</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Indicates that the cookie should only be transmitted over a secure</p>
<p class="description"><p>HTTPS connection from the client. When set to TRUE, the cookie will  only be set if a secure connection exists. The default is FALSE. On  the server-side, it's on the programmer to send this kind of cookie  only on secure connection (e.g. with respect to $_SERVER[&quot;HTTPS&quot;]).</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setSecure
		</span>
					(<span class="var-type">secure</span>&nbsp;<span class="var-name">$secure</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">secure</span>
				<span class="var-name">$secure</span><span class="var-description">: Boolean transmit over a secure HTTPS connection</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetValue" id="setValue"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setValue</span> (line <span class="line-number">122</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the value of the cookie.</p>
<p class="description"><p>This value is stored on the clients computer;  do not store sensitive information.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setValue
		</span>
					(<span class="var-type">value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">value</span>
				<span class="var-name">$value</span><span class="var-description">: The value of the cookie.</span>			</li>
				</ul>
		
			
	</div>
<a name="method__toString" id="__toString"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">__toString</span> (line <span class="line-number">279</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">String representation of this cookie.</p>
	<ul class="tags">
				<li><span class="field">return:</span> representation of this cookie.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">String</span>
		<span class="method-name">
			__toString
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Sun, 10 Feb 2008 15:16:14 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>